added server chain and file existance validation