fixed interface and end of file check