Fixed chat writing-to-old-version-of-file bug.
Fixed docs