Fix issue if pid_file or log_file is None.