fixed path and added check for compiled nginx