Logging gnome-screensaver’s debug output during normal startup

jani@saegusa:~$ cat > gs-debug.sh
#!/bin/sh
gnome-screensaver --debug 2>~/gs-debug.log
jani@saegusa:~$ chmod +x gs-debug.sh 
jani@saegusa:~$ sed 's@^Exec=gnome-screensaver$@Exec=/home/jani/gs-debug.sh@' /etc/xdg/autostart/gnome-screensaver.desktop > ~/.config/autostart/gnome-screensaver.desktop