Added "append" logic, and newline characters can now be configured