check if port open in beginning of script