initial support for the file handler with directory handling