If the PDF is already on disk, it's a good sign that we've already sent the email, so skip in that case. To make the signal a bit more reliable, make writing the PDF to disk the last action taken, in case sending the email fails.