Hi inacho. Thanks for playing and the feedback.
You should only lose if the train derails or if you connect the wrong track 3 times (there is an indicator for errors at the top). If you are failing for any other reason, let me know because that would be a bug.