got rid of warnings ignoring return value of read