Minor code clean up to avoid empty catch block even in test classes