Replace the possibly extraneous sleep with a rmt call to ensure server available.