Added function to see whether help was printed.
Added a few debug print statments which can be activated if the user
wants.