Always remove line hooks, even on error