Cleaned up code and got file size properly formatted in the email message.