change so that initial directories will be created if they don't exist