add newline at the end when pretty=1