Added error handling for non-existant Message when creating attachment