Clean authentication in different file formats