extract version to file