fix while
change tabtrigger from $.w to log for $.writeln()
add $.appEncoding