fixed some unix file handler problem