more sensible handling of the log method
added init method to set where the log output will go, by default this
is standard out