Added stderr logging for debug true and also an actual email to send error messages to.