better server side file handling
probably better file handling!