adding extensions to output files