added ostream field to use in write operations