Added optional debugging to top of file