remove log and optimize source code for external feature