Added a deferred string formatting option to the logstate method and modified clear_job to use it. This avoids unnecessary object stringifications when not running with "debugging" enabled.