Re-factor the code to make load_maps function and configure monitoring thread with it and reload_time interval