Makes a function conform to node-style callback convention