Add graceful prehook fn