cleaner handling of command output