Add more logging to QM