 				writer.writeElement 'timestamp', String(Math.floor (do version.timestamp.getTime) / 1000)
 				
 				# e.g. #{host}/com.example.wcf.test/1.0.0_Alpha_15
-				writer.writeElement 'file', "#{host}/#{_package.name}/#{versionNumber.toLowerCase().replace (new RegExp ' ', 'g'), '_'}"
+				writer.writeElement 'file', "#{host}/#{_package.name}/#{versionNumber.toLowerCase().replace /[ ]/g, '_'}"
 				
 				# try to extract license
 				if version.license

								
								versionNumber = versionPackageXml.package.packageinformation[0].version[0]
								# the tar file is incorrectly named -> abort
								if (versionNumber.toLowerCase().replace (new RegExp ' ', 'g'), '_') isnt path.basename versionFile, '.tar'
									fileCallback "version number does not match filename in  #{versionFile} (#{versionNumber.toLowerCase().replace new RegExp(' ', 'g'), '_'} != #{path.basename versionFile, '.tar'})"
									return
								
								# set {package,author}information to the ones of the last package found (the newest one)

logDownload = (packageName, version) ->
	return unless config.enableStatistics
	
	version = version.toLowerCase().replace /[ ]/g, '_'
	unless downloadCounterFiles[packageName]?[version]?
		downloadCounterFiles[packageName] = { } unless downloadCounterFiles[packageName]?
		downloadCounterFiles[packageName][version] = 0
