Draft: Improve error handling when attaching files