Minor logging changes and exception handling.