Fix the problem when output file is opened by MS Excel process