added option to override line separator