Ok, It opens the content of the 'datam.log' file in a command window.

Could it be that this function can't handle a file with 796 lines?

I'm just guessing here since it workd perfect on a file with 50 lines.

The instructions on this function says that there is no limit or if i missunderstood 1000 lines. But still i need only 10 lines which is the default.

ReadFileTail()