[fs] handle ftell() error condition