fixed manage file not getting removed from database when needed