Merged two try-catch blocks in -main