Added debug to getPosts()