removing realpath dep
removing tmp files at the end
also verifying pok of the plaintexts