Merge New features from pk_lots branch.
* database confirm method in different threads, maximum 5 seconds /each check
* close current db connection when error take place.