Wait for dir creation before creating files.