minor edits to error check code
Merge remote-tracking branch 'origin/release'
small code refactor
fixed error message
fixed error message v1.1
Merge remote-tracking branch 'origin/master' into release