Realmd: better error handling