add newline at end of file, add error message on HTML (still ugly)