File read/write corrections