delete redundant "if", "try catch"
add semicolon
remove unused param