fileops: fix invalid read