add debug information to source code and fix source compatibility issues