add callback to constructor
renamed fs to self to avoid confusion with the global object