test return values of fgets & system