Fix missing definition of APIError
Allow 'td -k' without config file