Updated error handling when files are not provided