Conditionally replace readsfrom to suppress warnings