update modtime only when valid json is read (to solve issues from possibly inconsistent files)