save debug.log in correct directory