Train doors

Train doors: how can reliable and safe opening and closing be ensured?