Train carrying hazardous cargo derails in northwestern Minnesota