removed faulty and unnecessary logging code