When midwives couldn't find a heartbeat they said the machine was faulty, but they were wrong