Added error message for missing trajectory component