use global variable for hooks
Warn if promise is rejected but not caught