added error handling in case of mininet failure