Add hooks for debugging