Added function for logging message to javascript console