add newline when writing references