Fix bug to attach file to mail