Added -d flag to psql to avoid errors