Fix typo in build.c that made fseek() fail
Improve error message handling for debugging