Checking if the provided port is valid; Checking if the directory exist in the proper place;