got writing of control files working