1)Added lock-style synchronization to FileStorage.
2) Fixed timing in tests