fixed logic error on using a log file in service host