Added some try/catch for file reading