Adding a hook for a loaded callback