Added code to debug permissions issue and some to-do comments on the printheader function to fix formatting.