restarting app instances in separate thread to not block the caller