make loop device released properly and make sure appropriate checks are made before re-adding image to loop device