switch error and filename messages