Modified: Used __dirname var for paths relative to the script