write to dot file