This may sound rather low-tech, but when I have a problem with my Startup sequence or User startup and I can't for the life of me work out where the hell the problem is then I edit it and insert a bunch of "echo" commands,
eg, every other line, insert Echo "1", Echo "2", etc
When the startup sequence is run then you can see exactly what the last command was run from the numbers printed by the Echo command.
Like I said, it's worked for me. :-)