handle non-existent files and folders