organize output file creation