fix typo and unmanaged file behavior