Wrap socket close in pcall

Also the checkArg's worked just fine.