[IMP] Improve code for V7 and display error message on the server log