Add missing fs dependency, update logging for output generation