Better Output and fixed EOF problem