You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sepiaIO.m
    path of file: ./repos/sepia
    
    the code of the file until where you have to start completion: %% sepiaIO(input,output,maskFullName,algorParam)
%
% Input
% --------------
% input         :   input directory cont
    
function check_and_create_sepia_config(input,output,maskFullName,algorParam,identifier)

sepia_universal_variables;

isConfigFileExist = false;

%%%%%%%%%%%% Step 1: Check if config file exists in the output dir %%%%%%%%%%%% 
output_index    = strfind(output, filesep);
outputDir       = output(1:output_index(end