added better log statements