simple write test using FileOutputStream now with newlines