Lost dog chases train, charms commuters