I'm not too concerned with this. This is file-related function. The bottleneck is in file operations which should be the main focus of optimization.