Move save functions to vpatch.c