implemented buffered file write, added uint chunk

Implemented buffered file writing for I/O files. Added a check to flush the
file on seek. Added chunk for processing unsigned integers.