Append user action and write in file