server now writes to file in local directory