add some debug log.
Error handling.

- On purchasing, let client be able to get error code.
- Test activity check if user canceled purchasing.
Add global switch for log.