Improved logging and alerting