error reporting refactored to a more generic system including warning and info