Catch exceptions to prevent crashing, also mention the teacher if a match occurs