broke build with the last commit, changed fprintf's with no file to write to, to writes