File handling implemented