Close new window on error creating terminal