Added some log code