Removed new invocation, it's not needed and added rejectUnauthorized to global options
Handle the callback better