Update error message and code comment