Replace .py by .log for the logfile