Modify DefaultCore class

Add a try-catch block to catch exceptions to improve stability.