file listener improved