adapted for relative workdirs