save XMLForm and write logs