Handle IP and added flags or localhost and IP