Better handling of version if the key exists already or not