on second thought __dirname was the way to go