changed errors to warnings and added error to break