write to file every minute, update