adding functionality for reading files in server dir.