abort of error if EOF returning -1 eternally