implemented file helpers, destructor's order