Fix oom, fix zero-sized files
Extend int to uint64_t