Flash flooding triggers state of emergency in Massachusetts