Add debug and fix not reading packets