Add timerange when closing writer