pgfplots shouldn't use \write16
Brought to you by:
cfeuersaenger,
ludewich
luatex has more write streams and \write16 is not special with this engine. This means that the messages of pgfplots which uses \immediate\write16 can end up in other open files. I don't have an example for pgfplots but one for pgf just came up: https://sourceforge.net/p/pgf/bugs/488/ and I think it is probably that one can build a similar for pgfplots.
The suggestion of the latex team is "to be portable and use an unopened stream you can use any number bigger than 127 or use \@unused"
http://tug.org/pipermail/luatex/2015-November/005485.html