def make_dirs(path):
        """
        Create directories if not exist
        :param path: string
        :return:
        """
        try:
            os.makedirs(os.path.dirname(path))
        except OSError as err:
            if err.errno != errno.EEXIST:
                LOGGER.error('Failed to create directory %s with error: %s' % (path, str(err)))
                raise
Create directories if not exist
        :param path: string
        :return: