Finally clause into its own function.