check the return value (dir creation)