add assert in case ftell fails