better filename detection for conf file