Cleaned up azure error and fixed the logging issue