Updated to print the prompt in the callback instead of using a separate method.
Updated example.