log statistics module, fixed several errors