added basic file read logic