Fix bugs in Docker file generation