Refactorized handling of syntaxError: Print debug output, removed a few return values that are no longer required