show that calling fseek() is important when switching between read and write operations on buffered IO