Managing Risks in the Railway System