Use File methods better