Updated sample server app to store directory to variable