removed warning for getcwd on line 41, added the if statement bcos the check wasn't there