use fs instead of exec and callback error in first parameter