Add logging for stdin mail
Fix broken tests.