Optimized reading speed

Instead of reading the entire file at one, it's faster to only reading small chunks of the file at a time.