Prevent errors when trying to access an invalid article via next/prev
Added debug output for error pages