Add a timeout parameter to wrapper::refresh to set custom timeout