rewrite errorwindow