Refactoring container start/stop logic
Handle hdfs local file resource correctly.