added lines creating output files