add debug file to fix memory corruption