fix message
improve error handling