Adding some whitespace for easier reading
Removing old print statement
Fixing error handling and target retrieval by tenant id