takes only parameter now, and creates debug files