Writes given content as an auto generated part to file considering options.