Output file fix