cleanup output in error-case