Fixed filename bug, added port option