changed verification method for checking if file exists