missing import of sys for error message