add error
improve error support