in reply to printing chr(10) to a file adds chr(13) infront
Originally posted as a Categorized Answer.