Add debug logging with --debug flag and change main to print json
Add usage help