Implement file buffer management
FIX BUG: do not read data from parcel if `read` returns negative