File handling and config file added