Update var dir before gen