Improved efficiency by not reading file recursively.