Reorganizing tmp directory creation task