Using C++. Added logs