Add error checking for missing files and folders.