seems filename might be undefined, throwing errors in windows node. Fixes #150