ensure @client exists before setting up traps