Driver taken to hospital after flipping car on tracks