added bool flag
added lock file in nagbar