Text replace debugging