handle subdirectories dynamically
use constants for static filenames