Added a log debugging system