crlf is a 2 character set 13 and 10. using len(a)-1 only takes out the line feed but leaves in the carrage return. So use len(a)-2 to remove both the carrage return and the line feed. When you write the file use Print a without the ; and you will get your crlf. I feel that even with the ; the close #1 writes a crlf automaticlly.
Wayne