Allow unbundle to output to stdout. Some initial clean up debug logging