Added try catch for exceptions in chuck. Saving the code which is in the code edit window.