fixed permission of output files