added: Debug code + eof patch