Added a check if the file exist or not