 	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 = { }

		
		# loop over each file in the package folder
		async.eachSeries files, (file, fileCallback) ->
			if (file.substring 0, 1) is '.'
				logger.log "notice", "Skipping dotfile #{config.packageFolder}#{file}"
				fileCallback null
				return
			if file is 'auth.json'
				fileCallback null
				return
			unless /^([a-z0-9_-]+\.[a-z0-9_-]+(?:\.[a-z0-9_-]+)+)$/i.test file
				logger.log "notice", "Skipping #{config.packageFolder}#{file}, as it does not match a valid package identifier"
				fileCallback null
				return
				
			packageFolder = config.packageFolder + file
			logger.log "debug", "Parsing #{packageFolder}"
			fs.stat packageFolder, (err, packageFolderStat) ->

				if err?
					callback "Error parsing package.xml of #{filename}: #{err}", null
					return
					
				# push the parsed contents to the callback
				callback null, contents
	
	tarStream.on 'error', -> callback "Error while extracting #{filename}", null

# Updates package list.
readPackages = (callback) ->
