Modified: use stderr for error mesg CS6
M: modify window options
M: modify try{}catch(){}