added support for files up to 1GB -- untested