Added -d option to specify where to write the control files