Thanks to reddit, fixed try/catch