added error in cases where there is no file.slice