Finished header checking and added debug return