Add profiling around course_handler