added function to dump phot files