Fixed incorrect intitialisation of persistent background buffer. Added output of persistent background in the CXI file.