fixes variable override issue by #for
fixes trimDirectiveWhitespaces issue for windows/mac format