Fixed error in output files