Fixed logging issue
Removed useless code