Removed debug and added a big try catch to debug windows