Add error message and start of save function