optimized file loading