Added parameters to customize delimiter and new line chars.