def validate_compile(self, instance_dir):
        """Checks wether or not the compiled end result is safe to run."""
        dmb_found = False

        for fname in os.listdir(instance_dir):
            if fname.endswith(".rsc"):
                raise BotError("Resource file detected. Execution aborted.", "validate_compile")
            elif fname.endswith(".dmb"):
                dmb_found = True

        if not dmb_found:
            raise BotError("Compilation failed and no .dmb was generated.", "validate_compile")