Work on bugs with launch on file and dir mode