added files methods to the api and removed some debug code