A long, black canvas bag was about 20 minutes away from being x-rayed and possibly being blown up by emergency personnel after it was left unattended at Whitman Public Library recently. The bag, which resembled a gun carrier, triggered the town to issue an alert through its Code Red notification system. Although it turned out to contain only books and clothing, Police Chief Scott Benton and Fire Chief Timothy J. Grenno both said in interviews that they would rather err on the side of caution. “We’re never going to put the public safety of our citizens at risk,” said Grenno. He said it was a successful run of the Code Red system, which alerts community members of serious public safety situations. The teenage boy who had left the bag in the library was contacted through the Code Red and went to retrieve his bag. State Police technicians had reached the scene and were planning their next steps, including x-raying the bag and possibly destroying it, Grenno said. Residents can sign up to receive Code Red alerts through the town’s website, www.whitman-ma.gov.