added error_and_exit(), BUFFERSIZE