optimize file path formatting