fixed files losing file_type by setting it later