fixed mkdir to be more careful