FileManager bugfixes and Document error events