added abiliy to close LocalFileHandler if in offline mode