fix mkdir data call db call before dir ready