Minor code updates, added in some additional logging messages.