Using AssertionError and better log print