refatoring nexus work dir/subdir creation