Refactor FileManager conditions #6