you can't wrap `defer` blocks; rearrange