Detect when a file is still open and display it in tail -f, if it's closed then just cat