applaying the directory change when sourcing the hooks