@Override
	protected boolean onCreate(ThreadMsg msg) {
		boolean ret;
		
		ret = super.onCreate(msg);
		if (ret) {
			if (m_logFile != null) {
				try {
					printInfo("Start log thread creation procedure...");
					m_logThreadLock.lock();
					
					if (m_logThread == null) {
						m_logPath = Paths.get(m_logFile);
						if (Files.exists(m_logPath)) {
							if (Files.isDirectory(m_logPath)) {
								m_dailyLog = true;
							} else if (Files.isWritable(m_logPath)) {
								m_dailyLog = false;
								
								m_curLog = Files.newBufferedWriter(m_logPath, m_logCharSet, StandardOpenOption.WRITE, StandardOpenOption.APPEND);
							} else {
								ret = false;
							}
						} else {
							ret = false;
						}
						
						if (ret) {
							// Set log thread at last
							m_logThread = this;
							printInfo("Log thread finished creation!");
						}
					} else {
						printWarning("Thread %d (%s) tried to register log thread again!", m_threadId, m_threadName);
						
						ret = false;
					}
				} catch (InvalidPathException e) {
					printError("Invalid log file path %s!", m_logFile);
					
					ret = false;
				} catch (IOException e) {
					printError("Met IO exception when opening log file %s!", m_logFile);
				} finally {
					m_logThreadLock.unlock();
				}
			} else {
				ret = false;
			}
		}
		
		return ret;
	}