added error messages if debug is enabled
Merge branch 'dev'
Merge remote-tracking branch 'origin/master'