Use exclusive lock on session write.
Put lock flag on filesystem class.