Fix logging error when using script path