Added verification of successful window creation