make sure to run makedirs and not mkdir