can you change psnr plugin so it write to a file instead to stout? you only have to set a new imput parameter : file discriptor and then use a fprintf where there is printf so you should againg be able to write to STDOUT=)