Should use os.path.splitext(msg_file)[0] to strip off the file extension