Clean up logging
Update 7digital-api
Output json when stdout is a pipe