util.py: limit printed output to 10k chars

otherwise travis build fails early because of 4Mb log limit.