added error number for file open failed. also added more training data