Fix bugs in fann error functions
Test fann error functions