Switched to python inbuilt logging

Added python logging library and command line parsing for log level.
Changed DEBUG print statements to logging.debug() statements.