move directory setup to sudo