added stat functions, other major changes to File