made log file and database path more dynamic
Bug fix
Some locking changes