Changed to using graceful-fs instead of fs