consider attachment images as well
catch potential exception