ios::ate "sets the stream's position indicator to the end of the stream on opening."
ios:app "set the stream's position indicator to the end of the stream before each output operation."
This means the difference that ate puts your position to the end of the file when you open it. ios::app instead puts it at the end of the file every time you flush your stream. If for example you two programs that write to the same log file ios:ate will override anything that was added to the file since your program opend that file. ios:app instead will jump to the end of file each time your programm adds a log entry.
It's well explained Here