clean up json save mechanism