server now writes to a file