needs mkdir earlier