updated last modified when buf is closed