Added working directory detection
Forgot header