Fix bug when setting record_type

Seems that the API now uses A and AAAA instead of 0 and 1 for record types
Add some logging stuff (or improve what was already there)