Fix version file creation
Add possibility to control the prefix and the full output file