Updated error message with deprecated flags
(cherry picked from commit 7ce96e2449fedaa99c02f4db29e3c25c38c66241)