Fixing bug that parent directory did not first exist
 -changing owner/group to parameterized values
 -formatting