changed the variable from currentDirectory to mainDirectory in the server file