Using sponge to fix empty file problem.