Adjust debug script for daemon mode debugging