moved fread out of assert call