write order to file