Added some logging. beter work