add logging and go fmt