Fixed minor logging bug in dicom_mod and changed the code around in utils.py