remove double unref when file exists