changes to dir creation and ownership