Pull dist file lookup logic out of publish method