update cached file if original file changes