More error checking for xdotool