Extract the END_OF_FILE constant

Signed-off-by: Igor Popov <igor.popov89@gmail.com>