add debug variable and check for loader