Fixed concurrency issue with FileBasedStateRepository (#21)