Removed duplicate carriage returns when writing SQL to file