Swapping the output from console to the stderr. This allows us to use console.log as intended. Also put in some code to prevent blocking when the system was waiting for log messages to return.