I really really hate Windows: stupid \r\n crap needs separate file reading and writing modes