ftruncate result check, move record_garbage_collection()