adding FileObject.cpp which has file handling related functions