Modified component class to use native fs instead of require;