Fix writeinterval