Added include to bring in apr string functions and added additional debugging