Make it compilable under OS X
Output first 80% records only.

This is for conveniency of following routes picking up.
Fix huge memory footprint
Set timeout value default to 0