writing obj file