- Improve error report
- Add debug log