File reading and error handling using ?