optionally truncate large output