Fixes #14
Added more logging
Fixed #15