fixing output file reference.