Should sort out db file.
Fixed potential problem with commented out instance count logging.