Remove duplicate lines for ignoring "*.o".
Add missing errorcheck.