added filename validation