Moved truncation code; added a test; now test exit on fail
File sizes now are automatically determined