Move try/catch block of close() out from SparkHBaseWriter