added appication directory check