Allow to set custom client and log fatal errors.

Closes #2.