test for external dependencies and cleanup of tmp files