optimized file read-in