close file pointer
remove try catch