set proper headers for loading a file