File output is fubar