fix bug that crash the server if log file was None