Separated email and status into different functions. Also updated path to config file.