Added memory-sensitive file reading