Refactor utils logger

This _PR_ includes the follwing changes:
+ fix for some jshint issues, 
+ fix for a typo in function-name
+ refactoring to reduce the number of function calls to get a _timestamp_