performance improvements in file parsing