rewrite try..catch.. when importing leveldb