updated main function with port var and dir making