Remove unecessary Shellwords.escape and check if logs are not empty