Updates shell script to log output somewhere and not run Lua scripts if there aren't any new emails.