change server code try-catch