Fix warning.
Check if file size fits in size_t.
Fix tests.