Custom Post Type Rewrite Throws Headers Sent Errors

This happened to a site a friend of mine was working on. Whats weird is that he deleted the problematic file and copied paste the code into a new php file. It seemed to do the trick. worth a shot?