ELIZABETH, New Jersey (WABC) -- Two homeless men found a backpack in the trash, thinking there was something of value in it. Instead, what they discovered and their actions that followed potentially saved lives in Elizabeth, New Jersey.Elizabeth Mayor Christian Bollwage said five pipe bombs were found in the bag around 8:30 p.m. Sunday near the Elizabeth train station.Authorities say the two men immediately dropped the bag and walked around the corner to police headquarters. Police then informed the Union County Bomb Squad."One of those devices was being cut in order to disarm it and, as you all heard, the explosion occurred," Bollwage said. "The other devices, I don't know what the FBI and State Police are doing at this moment, but they are trying to remove them in a secure way so they can preserve them for evidence."No one was injured when the bomb went off.New Jersey Transit and Amtrak trains were suspended for hours, before NJT resumed service on the Northeast Corridor and North Jersey Coast Line at 5:30 a.m. Monday.Authorities then focused their attention on a building at Elmore and Linden Avenues, with a business and apartments above it, that is tied to 28-year-old Ahmad Rahami, the man who was later arrested in connection with the Chelsea and Seaside Park bombings "This search warrant obviously has led to the police from the previous investigation in Chelsea," Elizabeth Mayor Christian Bollwage said.Rahami, a naturalized citizen from Afghanistan, had lived at that address in Elizabeth, which is above a fried chicken restaurant reportedly owned by his father.(The Associated Press contributed to this report)