 	updating = yes
 	updateStart = do (new Date).getTime
 	
-	fs.exists config.packageFolder + 'auth.json', (authExists) ->
+	fs.exists "#{config.packageFolder}auth.json", (authExists) ->
+		# no auth.json was found
 		unless authExists
 			logger.log "warn", "auth.json does not exist. Assuming all packages are free"
 			auth = null
 			return
-		fs.readFile config.packageFolder + 'auth.json', (err, contents) ->
+			
+		fs.readFile "#{config.packageFolder}auth.json", (err, contents) ->
 			if err?
 				logger.log "error", "error reading auth.json. Denying access to all packages: #{err}"
 				auth = { }

	host = config.basePath ? "#{req.protocol}://#{req.header 'host'}"
	versionNumber = packageList?[req.params[0]]?.packageinformation?.version[0]
	unless versionNumber?
		res.send 404, '404 Not Found' if err?
		return
	res.redirect 301, "#{host}/#{req.params[0]}/#{versionNumber.replace (new RegExp ' ', 'g'), '_'}"


											versionsCallback err
											return
										versionNumber = versionPackageXml.package.packageinformation[0].version[0]
										# the tar file is incorrectly named -> abort
										if (versionNumber.replace (new RegExp ' ', 'g'), '_') isnt path.basename versionFile, '.tar'
											fileCallback "version number does not match file (#{versionNumber.replace new RegExp(' ', 'g'), '_'} != #{path.basename versionFile, '.tar'})"
											return
										
										currentVersion = { }
										currentVersion.versionnumber = versionNumber
										currentVersion.license = versionPackageXml.package.packageinformation[0].license?[0]
										currentVersion.fromversions = (instruction.$.fromversion for instruction in versionPackageXml.package.instructions when instruction.$.fromversion?)
										currentVersion.requiredpackages = versionPackageXml.package?.requiredpackages?[0]
										currentVersion.excludedpackages = versionPackageXml.package?.excludedpackages?[0]
										currentVersion.timestamp = versionFileStat.mtime
										currentPackage.versions[versionNumber] = currentVersion
										# TODO: optionals
										
										logger.log "debug", "Finished parsing #{versionFile}"
										versionsCallback null
							, (err) ->
