mpd: catch errors when writing command.