output format option, bug fixes.