Add an exception check
Change logging statements to use comma-seperated args instead of percents.