little improvemendin error reporting