added changing of working directory and enabled power manager