add version header
allow customizing base dir and num