let the script inherit the parent's stdout and stdin, create log file if not exist