Narrow the scope of *local* and print error message