adding configuration file handling and delay