file exists add

added a test if the file existas or not to avoid exception