Use option parser for client
Added mutex lock for client list