Empty lines are added to files downloaded from FTP.

This problem can arise if the files have either been uploaded using the wrong transfer mode or it could be because the wrong transfer mode is used to download them.

If you have upload your files using an FTP client in Binary transfer mode and then try to download these files via the built-in FTP features of your code editor which use the correct ASCII mode, you may get empty lines.

You should always use only ASCII transfer mode for text files and enforce this setting in all your FTP client programs. Usually FTP client programs allow you to specify which file types should be treated as text files.