Refactor run_update_hook to be more useful