Read file instead of just from stdin. Resolves truncation issues.