This is just the syscalls and error handling that was done for each file in delete_paths. This will be used to prevent the unneeded construction of vectors when performing cut operations