added not null validation to filePath