Explicitly call walletlock at the end