improved keeptxt output formatting