Fixed bug in write with erroneous newline
Package