Add catch for file access errors in typescript tools