Extract version information and add version to file name