Bug fixing: catching error when the training file is not found