Additional logging and exception trapping