Added sample-specific logging; cleaned up directory creation.