move safe hook to a file