added exception handling, improved db locking
gs_config fixed
Merge pull request #1 from smartexpert/master

exception handling and new locking mechnism