Added module and line number prefix to debug messages.
Adjusted logging.