Updated debugging , catching runtime exception