Added log functionality, using log4js.