Added debug logging

- added configurable amount of debug logging -v...
- added debug log function
- added hexdump