Fixed the issue with version file not being written properly.