dirPath    <- "/var/www/lbc-file/r/v1"
fileMatrix <- "TransitionMatrix.xlsx"
# filesPath <- "Teste/"
# inpFile   <- "Inputs-Teste.xlsx"
# filesPath <- "Bravinhos/"
# inpFile   <- "Inputs-Bravinhos.xlsx"
filesPath <- "Cedro/"
inpFile   <- "Inputs-Cedro.xlsx"
# filesPath <- "Template Inputs/"
# inpFile   <- "Inputs-Template.xlsx"
# filesPath <- "Juá/"
# inpFile   <- "Inputs-Juá.xlsx"

# rm(list=ls())
setwd(dirPath)
source("Libraries.R")
source("RunGEE.R")

# setting up logger
suppressWarnings(file.remove(paste0(filesPath, inpFile, "-logfile.log")))
logger <- create.logger(paste0(filesPath, inpFile, "-logfile.log"), level = "INFO")

# Loading input's category and diet data
allInp <- readInput(filepath = paste0(filesPath, inpFile), mtxpath = fileMatrix, logger = logger)

allOut <- runGEE(allInp = allInp, logger = logger)

# Writing output file
writeDF(filepath = paste0(filesPath, "Outputs-", inpFile, ".xlsx"), resList = allOut, logger = logger)

info(logger, "The code ran successfully.")

