Changed it to use the python logging rather than outputting to console.  Also made it
throw more errors.