updated to handle invalid ics file.