When was the Steam Locomotive Invented?

Richard Trevithick has the credit for the first design of a steam locomotive in 1804. But George Stephenson was the first to build the coal locomotive in 1814 to haul coal.