Derailed train in northern Maine was carrying flammable chemicals