Machine learning for file management