added function get_free_space_bytes and self.threshold_in_bytes on the frontend