Create backup of state file
Better handling of exceptions