fix mistake with undefined include for library stdlib, add log to file for gateway