Minor: added log on lock, unlock of storage files
Distributed: fixed minor issues on replication
Minor: added check for NULL record