Write queue after connect windows

Error handling needs to be re-checked. This function returns an error if it fails, which we are ignoring here.