It should work. Maybe the file path is wrong? Please post a support incident, somebody will have to help you debug the code directly.
At this point I would start adding echo() and die() statements to try to figure out what was and wasn't working. Something clearly isn't working right, but it is hard to determine without debugging the page itself while it is running.