changed stuff

added if to deletefile and changed naming format