Added append mode for local files