fixed mkdir, cleaning up