begin to split file server functionaly from server.go