they had scarcely cleared the open doors when the loft collapsed with a thunderous boom , and the barn belched a cloud of smoke and burning debris that nearly enveloped them as the crossed the threshold .