fixed directories and standardize os. calls