Refactor log

Refactor LogModule class.
Should we use java nio 2? (since Java 7)