[cyril] moved path creating code.