Ionization induced decomposition and diffusion in thin polymer films