fixed previous commit so that launch_instances() only considers pending or running instances when seeing if it is allowed to launch any new instances
flush redis stderr to file when exiting test server