fixing prompt err
improve error reporting