first check if file exists before checking the files size