Fixed the warning logic when hostname is empty
Made service error log more readable