Use `defer` to switch to callback mode