more work on buffered file stream