Switched to try catch