add try catch wrap for test