Bug fix for detecting forcode when forgroup followed by newline. Remove excess white space from forgroup. Add debug handle info