fix issue #99 - emailing does not work when dealing with large files