create history files with the proper mode