fixing client file handling