adds more error catching
Merge branch 'master', remote-tracking branch 'origin'