protected function checkIfFoldersExist() {
        $arrFilePath = explode(DIRECTORY_SEPARATOR, $this->filePath);
        array_pop($arrFilePath); //Remove filename
        if (count($arrFilePath) > 0) {
            $folderPath = implode(DIRECTORY_SEPARATOR, $arrFilePath);
            $folder = new Folder();
            $folder->createFolderIfNotExists($folderPath);
        }
    }