removed constructor parameter and code to flush unused fd