Folder existence check added.