Story11 email feature

1. You are effectively duplicating the way the file name for the (temporary) measurements file is constructed. What happens if somebody changes this in one place, but forgets to update the other?
2. What is the value of __dirname? It is not a good practice to store generated files inside the application directory, even temporary. You may not even have write permissions for that directory, depending on how the sysadmin sets up the system. Most OSes have a dedicated, world-writable directory for temporary files. Node.js provides have a platform-independent way to retrieve the path to this directory - please check the docs
3. Of what type is `hdf`? I assume it's a ReadableStream? Please check the docs for nodemailer - there could be a way to send the attachment w/o needing to create a temporary file (and with it, useless I/O operations)