mkdir was causing problems. Not entirely fixed yet.