check for files existance before trying to do anything