use logging rather than writing to stdout directly
add a silence logging decorator