enhance logging function and help command