improve file desciptor RAII