Added --appdir option