Make sftp access compatible with Synology DSM and apply some general optimization