Reduced file accesses for additional dependencies,
fixed stdout/stderr handilng,
updated unit tests