Do version parsing once

Change-Id: If418ba2131fef4b6e42f19ca598be2f43aaddbe2