File reading logic - fix1