workking failsafe saving