Fixed checking no opened file, fixed searching for config in opened files, issue #173