Switched run order for bash script