Added missing import of sys