better logging in calculator sample