Updates for error logging and more