New error logging, comments
Revised error logging