 			if err?
 				logger.log "crit", "Error reading package list: #{err}"
 				updating = no
-				callback false if callback?
+				callback? false
 				return
 			
 			# overwrite packageList once everything succeeded

			updating = no
			
			# and finally call the callback
			(callback true) if callback?
			
askForCredentials = (req, res) ->
	res.type 'txt'

		path: config.packageFolder
		ignoreCustomPatterns: /\.txt$/
		listeners:
			watching: (err, watcherInstance, isWatching) ->
				if err
					console.log "watching the path #{watcherInstance.path} failed with error:", err
				else
					console.log "watching the path #{watcherInstance.path} completed"
			change: (changeType, filePath, fileCurrentStat, filePreviousStat) ->
				logger.log "notice", "The package folder was changed (#{filePath}: #{changeType})"
				clearTimeout updateTimeout if updateTimeout?
