Updated run_network with try/catch