Added fileformats option. Now use unix-style newline even in Windows.