Extending error messages for better diagnostics