the replacement of debug() was necessary to be able to access the lua library "debug" (for backtraces etc.)