Correction of filemode and elasticsearchmode initialization