Check if read returns anything, going to refactor all this soon to use errno