Fixed bug when invoking from directory other than pwd