no longer buffering output when writing to file