Add a error checking in helixmc-run