Better handling of PATH and timeouts