Added try-except to deleting files