Use clearerr instead of fseek