Optimized FileUtils code