adding logging to not spam email