Added catch block for the filenotfound exception