fix

average distance change
fix

fix bugs
fix

sending email with attachment, save file in external directory