added xdotool dependency
fixed a bug with the error() function