Changed logging to print to terminal as well.