fixed wrong way of looking for configuration files in different
directories