fix fullpath check when deleting file