Added error reporting for validation