Train derails downtown, threatens July 4 fireworks