Fix error on attaching files in the message