try catch for parsing errors