Error checking now looks for any defined error, since error is a string on error, not a boolean.