Made the filesystemindexer more safe and fault-tollerant