TODO: 1. add terminate signal for back thread; 2. complete log entry output