changed  typeout to wlog