Added support for passing port to application