Close fie before deleting to prevent multiple prompts on edited files