filesystem subroutines moved to new module