Added error handling for configfile and decrypt errors