Prairieville man dies trying to beat train