Added in crude debug logging. Activate by adding extra arg 'debug' at end of command line. Closes #17.