Tweaking

* Use the POST_TYPE constant
* Add some debug so it's clear where the posts go
Error handling